file(GLOB_RECURSE SOURCE
    "*.cpp"
)
file(GLOB_RECURSE HEADER
    "*.h"
)

# Add folders to filters
file(GLOB MAIN_SOURCE                                                 *.cpp *.h)
file(GLOB CONSOLE_SOURCE  RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Console/*.cpp  ${CMAKE_CURRENT_SOURCE_DIR}/Console/*.h )
file(GLOB GAME_SOURCE     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Game/*.cpp     ${CMAKE_CURRENT_SOURCE_DIR}/Game/*.h    )
file(GLOB LOOPER_SOURCE   RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Looper/*.cpp   ${CMAKE_CURRENT_SOURCE_DIR}/Looper/*.h  )
file(GLOB RENDERER_SOURCE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Renderer/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Renderer/*.h)
file(GLOB UTIL_SOURCE     RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Util/*.cpp     ${CMAKE_CURRENT_SOURCE_DIR}/Util/*.h    )

source_group(Main     FILES ${MAIN_SOURCE})
source_group(Console  FILES ${CONSOLE_SOURCE})
source_group(Game     FILES ${GAME_SOURCE})
source_group(Looper   FILES ${LOOPER_SOURCE})
source_group(Renderer FILES ${RENDERER_SOURCE})
source_group(Util     FILES ${UTIL_SOURCE})

ADD_EXECUTABLE(Game ${SOURCE} ${HEADER})